// programa para manejar lcd//

#include <16F877.H>
#use delay (clock=4000000)
#fuses HS,NOWDT,NOPUT,NOPROTECT,NOBROWNOUT,NOLVP,NOCPD

#include<lcd.c>



void main (void){
	int8 cont=0, cont1=0,cont2=0,cont3=0;
	
	lcd_init();
	lcd_putc("\f DI:   MI:   \nHRS:   SE:");

	while(1){
		for (cont=0;cont<60;cont++){
            delay_ms (1000);
			LCD_gotoxy(5,1);
		    printf(lcd_putc,"%2u",cont);
					
						for (cont1=0;cont1<24;cont1++){
						delay_ms (1000);
						LCD_gotoxy(5,2);
		  				printf(lcd_putc,"%2u",cont1);

								for (cont2=0;cont2<60;cont2++){
								delay_ms (1000);
								LCD_gotoxy(11,1);
		  						printf(lcd_putc,"%2u",cont2);

									for (cont3=0;cont3<60;cont3++){
									delay_ms (1000);
									LCD_gotoxy(11,2);
		  							printf(lcd_putc,"%2u",cont3);

								
						}		
				}
			}			
		}
	}
}

